import Vue from 'vue'
import moment from 'dayjs'

// 订单号加密
Vue.filter('orderidEncrypt', (value) => {
  return value.slice(0, 4) + '*******' + value.slice(-4, value.length)
})

// moment时间格式YYYY.MM.DD
Vue.filter('YYYYMMDD', (value, symbol) => {
  return moment(value).format(`YYYY${symbol}MM${symbol}DD`)
})

Vue.filter('formatDate', (time) => {
  return time.split("T")[0];
})
Vue.filter('formatPhone',(value)=>{
  return value.substring(0,3)+"****"+value.substring(7,11)
})
